From c720eb6ab76d4b6699d022182daf014df3507d97 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Fri, 8 Dec 2006 11:47:09 +0000 Subject: [PATCH] [LINUX] Kexec: Remove remainder of kexec-generic.patch Rename xen_machine_kexec() to just machine_kexec() and only compile in the Xen or native version as appropriate. Signed-off-by: Ian Campbell --- .../arch/i386/kernel/machine_kexec.c | 2 ++ .../arch/x86_64/kernel/machine_kexec.c | 2 ++ .../drivers/xen/core/machine_kexec.c | 2 +- linux-2.6-xen-sparse/include/linux/kexec.h | 1 - linux-2.6-xen-sparse/kernel/kexec.c | 4 ---- patches/linux-2.6.16.33/kexec-generic.patch | 15 --------------- patches/linux-2.6.16.33/series | 1 - 7 files changed, 5 insertions(+), 22 deletions(-) delete mode 100644 patches/linux-2.6.16.33/kexec-generic.patch diff --git a/linux-2.6-xen-sparse/arch/i386/kernel/machine_kexec.c b/linux-2.6-xen-sparse/arch/i386/kernel/machine_kexec.c index f9ebc85481..d3979a6531 100644 --- a/linux-2.6-xen-sparse/arch/i386/kernel/machine_kexec.c +++ b/linux-2.6-xen-sparse/arch/i386/kernel/machine_kexec.c @@ -92,6 +92,7 @@ void machine_kexec_cleanup(struct kimage *image) { } +#ifndef CONFIG_XEN /* * Do not allocate memory (or fail in any way) in machine_kexec(). * We are past the point of no return, committed to rebooting now. @@ -125,3 +126,4 @@ NORET_TYPE void machine_kexec(struct kimage *image) relocate_kernel((unsigned long)image->head, (unsigned long)page_list, image->start, cpu_has_pae); } +#endif diff --git a/linux-2.6-xen-sparse/arch/x86_64/kernel/machine_kexec.c b/linux-2.6-xen-sparse/arch/x86_64/kernel/machine_kexec.c index f598578b0c..f1d9583880 100644 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/machine_kexec.c +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/machine_kexec.c @@ -237,6 +237,7 @@ void machine_kexec_cleanup(struct kimage *image) return; } +#ifndef CONFIG_XEN /* * Do not allocate memory (or fail in any way) in machine_kexec(). * We are past the point of no return, committed to rebooting now. @@ -275,3 +276,4 @@ NORET_TYPE void machine_kexec(struct kimage *image) relocate_kernel((unsigned long)image->head, (unsigned long)page_list, image->start); } +#endif diff --git a/linux-2.6-xen-sparse/drivers/xen/core/machine_kexec.c b/linux-2.6-xen-sparse/drivers/xen/core/machine_kexec.c index 5e6b58b390..a16e9d9a22 100644 --- a/linux-2.6-xen-sparse/drivers/xen/core/machine_kexec.c +++ b/linux-2.6-xen-sparse/drivers/xen/core/machine_kexec.c @@ -163,7 +163,7 @@ void xen_machine_kexec_unload(struct kimage *image) * stop all CPUs and kexec. That is it combines machine_shutdown() * and machine_kexec() in Linux kexec terms. */ -NORET_TYPE void xen_machine_kexec(struct kimage *image) +NORET_TYPE void machine_kexec(struct kimage *image) { xen_kexec_exec_t xke; diff --git a/linux-2.6-xen-sparse/include/linux/kexec.h b/linux-2.6-xen-sparse/include/linux/kexec.h index b51072d4ed..8f4fccf63c 100644 --- a/linux-2.6-xen-sparse/include/linux/kexec.h +++ b/linux-2.6-xen-sparse/include/linux/kexec.h @@ -101,7 +101,6 @@ extern void machine_kexec_cleanup(struct kimage *image); #ifdef CONFIG_XEN extern int xen_machine_kexec_load(struct kimage *image); extern void xen_machine_kexec_unload(struct kimage *image); -extern NORET_TYPE void xen_machine_kexec(struct kimage *image) ATTRIB_NORET; extern void xen_machine_kexec_setup_resources(void); extern void xen_machine_kexec_register_resources(struct resource *res); #endif diff --git a/linux-2.6-xen-sparse/kernel/kexec.c b/linux-2.6-xen-sparse/kernel/kexec.c index 1dd4096967..9a1dbb6ae3 100644 --- a/linux-2.6-xen-sparse/kernel/kexec.c +++ b/linux-2.6-xen-sparse/kernel/kexec.c @@ -1085,11 +1085,7 @@ void crash_kexec(struct pt_regs *regs) struct pt_regs fixed_regs; crash_setup_regs(&fixed_regs, regs); machine_crash_shutdown(&fixed_regs); -#ifdef CONFIG_XEN - xen_machine_kexec(image); -#else machine_kexec(image); -#endif } xchg(&kexec_lock, 0); } diff --git a/patches/linux-2.6.16.33/kexec-generic.patch b/patches/linux-2.6.16.33/kexec-generic.patch deleted file mode 100644 index a85d546e4d..0000000000 --- a/patches/linux-2.6.16.33/kexec-generic.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- 0002/kernel/sys.c -+++ work/kernel/sys.c -@@ -435,8 +435,12 @@ void kernel_kexec(void) - kernel_restart_prepare(NULL); - printk(KERN_EMERG "Starting new kernel\n"); - machine_shutdown(); -+#ifdef CONFIG_XEN -+ xen_machine_kexec(image); -+#else - machine_kexec(image); - #endif -+#endif - } - EXPORT_SYMBOL_GPL(kernel_kexec); - diff --git a/patches/linux-2.6.16.33/series b/patches/linux-2.6.16.33/series index 604aed27e9..28fabf00ff 100644 --- a/patches/linux-2.6.16.33/series +++ b/patches/linux-2.6.16.33/series @@ -1,4 +1,3 @@ -kexec-generic.patch git-2efe55a9cec8418f0e0cde3dc3787a42fddc4411.patch git-2a8a3d5b65e86ec1dfef7d268c64a909eab94af7.patch git-3566561bfadffcb5dbc85d576be80c0dbf2cccc9.patch -- 2.30.2